﻿using System.Windows;
using System.Windows.Controls;

namespace TestSocket
{
    /// <summary>
    /// Interaction logic for Choice.xaml
    /// </summary>
    public partial class Choice : UserControl, IPanel
    {
        MainWindow m_wnd;
        public Choice(MainWindow wnd)
        {
            InitializeComponent();
            m_wnd = wnd;
        }

        public void OnActivate()
        {
            
        }

        public void OnDeactivate()
        {
            
        }

        public void OnAppClosing()
        {
            
        }

        private void btnServer_Click(object sender, RoutedEventArgs e)
        {
            m_wnd.bServerMode = true;
            m_wnd.nxtScrn = ePanel.pnlConfig;  
        }

        private void btnClient_Click(object sender, RoutedEventArgs e)
        {
            m_wnd.bServerMode = false;
            m_wnd.nxtScrn = ePanel.pnlConfig;
        }
    }
}
